#include <windows.h>
#include "vector.h"
#pragma hdrstop

VECTOR::VECTOR(GLfloat sx, GLfloat sy, GLfloat sz)
:
	x(sx),
	y(sy),
	z(sz)
{
}

VECTOR::~VECTOR()
{
}

GLvoid VECTOR::Reset()
{
	x = 0;
	y = 0;
	z = 0;
}

GLfloat VECTOR::DotProduct(VECTOR vect)
{
  	GLfloat dot;
  	dot = vect.x * x + vect.y * y + vect.z * z;
  	return dot;
}

GLvoid VECTOR::CrossVector(VECTOR vect)
{
  	VECTOR temp = *this;
  	x = vect.y * temp.z - vect.z * temp.y;
  	y = vect.z * temp.x - vect.x * temp.z;
  	z = vect.x * temp.y - vect.y * temp.x;
}
